<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/system/merchantEmployees/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>员工姓名：<input type="text" name="employeeName" value="${requestScope.dwzPageBean.countResultMap.employeeName}" placeholder="输入员工真实姓名" /></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${pageContext.request.contextPath}/system/merchantEmployees/toInsert" rel="insert" target="dialog" width="820" height="460" mask="true"><span>添加</span></a></li>
			<li><a class="delete" href="${pageContext.request.contextPath}/system/merchantEmployees/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a></li>
			<shiro:hasPermission name="/system/merchantEmployees/importExcel">
			<li><a class="icon" href="${pageContext.request.contextPath}/system/merchantEmployees/toImportExcel" target="dialog" rel="excel" mask="true" height="120"><span>导入EXCEL</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="account_num" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'account_num'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>帐号</th>
				<th orderField="employee_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'employee_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>员工真实姓名</th>
				<th orderField="employee_sex" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'employee_sex'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>性别</th>
				<th orderField="employee_phone" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'employee_phone'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>电话</th>
				
				<th orderField="dname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'dname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>部门</th>
				
				<th orderField="employee_birthday" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'employee_birthday'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>生日</th>
				<th orderField="idcd" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'idcd'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>身份证号</th>
				<th orderField="asct" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'asct'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>门禁号</th>
				<th orderField="employee_state" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'employee_state'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>员工状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>

			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr  ondblclick="openDetails(this)" target="dialog" href="${pageContext.request.contextPath}/system/merchantEmployees/toUpdate?id=${record.employeeId}" title="编辑">
						<td><c:if test="${record.del!=3 }">
								<input name="id" value="${record.employeeId}" type="checkbox">
							</c:if></td>
						<td>${record.accountNum}</td>
						<td>${record.employeeName}</td>
						<td>${record.employeeSex == 1? "男":"女"}</td>
						<td>${record.employeePhone}</td>
						<td>${record.dname}</td>
						<td><fmt:formatDate value="${record.employeeBirthday}" pattern="yyyy-MM-dd" /></td>
						
						<td>${record.idcd}</td>
						<td>${record.asct}</td>
						
						<td>${record.employeeState==0?"正常":"停用"}</td>
						<td>
							<a class="deleteBtn" title="授权角色" href="${pageContext.request.contextPath}/system/merchantEmployees/toUpdateRole?id=${record.employeeId}" rel="update" target="dialog" width="820" height="460" mask="true"><span>授权角色</span></a>
							<a title="编辑" target="dialog" width="820" height="460" href="${pageContext.request.contextPath}/system/merchantEmployees/toUpdate?id=${record.employeeId}" class="editBtn" mask="true"><span>编辑</span></a>
							<c:if test="${record.del!=3}">
								<a title="确定要删除吗？" mask="true" target="ajaxTodo" href="${pageContext.request.contextPath}/system/merchantEmployees/delete?id=${record.employeeId}" class="deleteBtn"><span>删除</span></a>
							</c:if></td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>